target('engine')
    set_kind(is_os('windows') and 'static' or 'shared')
    set_objectdir('./build/.objs')
    set_targetdir('./build')
    set_warnings('all')
    
    if is_os('linux') then
        add_defines('LUA_USE_LINUX')
        add_cflags('-pipe', '-Wno-unused-result')
        add_links('pthread', 'uuid', 'dl')
    elseif is_mode('debug') then
        set_symbols('debug')
        add_defines('DEBUG', '_DEBUG')
        set_optimize('none')
    end

    add_includedirs('include')
    add_files('src/*.cc', {languages = 'cxx11'})
    add_files('src/**/*.c')
target_end()